home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / doc / git / README.Debian < prev    next >
Encoding:
Text File  |  2011-09-22  |  2.7 KB  |  73 lines

  1. Git for Debian
  2. --------------
  3.  
  4. When setting up a git.example.org server, there are several things to
  5. configure to make everything work nicely together.  All this is optional.
  6.  
  7. 1. Run a git-daemon.  This allows people to use a git:// URL to access your
  8. repositories.  This package provides the git-daemon program, to enable a
  9. git-daemon service, configure inetd(8) to launch it on demand, or install the
  10. git-daemon-run package to run it permanently:
  11.  cat >> /etc/inetd.conf <<EOF
  12. git stream tcp4 nowait nobody /usr/bin/git git daemon --inetd --base-path=/srv/git
  13. git stream tcp6 nowait nobody /usr/bin/git git daemon --inetd --base-path=/srv/git
  14. EOF
  15.  
  16. Or:
  17.  apt-get install git-daemon-run
  18.  
  19. Wait five seconds for the service to be picked up, and check its status and
  20. logs:
  21.  
  22.  sv stat git-daemon
  23.  cat /var/log/git-daemon/current
  24.  
  25. The git daemon by default looks into the directory /var/cache/git/ for
  26. repositories (this is configured in /etc/sv/git-daemon/run).  It expects
  27. the repositories' .git subdirectories in /var/cache/git/, symlinks pointing
  28. to the corresponding subdirectories in the repositories are just fine, e.g.:
  29.  
  30.  ln -s ~pape/git/foo/.git /var/cache/git/foo.git
  31.  
  32. Now git-clone git://git.example.org/git/repo will work.
  33.  
  34. 2. Install rsync.  This allows people to use rsync:// URLs to access your
  35. repositories.  You then need to add a stanza to /etc/rsyncd.conf that looks
  36. like this:
  37.  
  38. [git]
  39.     path = /var/cache/git
  40.     readonly = yes
  41.  
  42. Now git-clone rsync://git.example.org/git/repo will work.
  43.  
  44. 3. Configure a web server for git.  This allows people to use a http:// URL
  45. to access your repositories.
  46.  
  47. Here's an example for an apache virtual server.  Add a stanza to your apache
  48. configuration that looks like this:
  49.  
  50. <VirtualHost *:80>
  51.     ServerName git.example.org
  52.     ServerAdmin webmaster@example.org
  53.     HeaderName HEADER
  54.     # bogus but safe DocumentRoot
  55.     DocumentRoot /var/cache/git
  56.     ErrorLog /var/log/apache-ssl/git.example.org-error.log
  57.     CustomLog /var/log/apache-ssl/git.example.org-access.log combined
  58.     Alias /robots.txt /var/www/cvs.robots.txt
  59.     Alias /gitweb.css /usr/share/gitweb/gitweb.css
  60.     Alias /gitweb.js /usr/share/gitweb/gitweb.js
  61.     Alias /git-favicon.png /usr/share/gitweb/git-favicon.png
  62.     Alias /git-logo.png /usr/share/gitweb/git-logo.png
  63.     Alias /git /var/cache/git
  64.     ScriptAlias / /usr/lib/cgi-bin/gitweb.cgi
  65.     RedirectMatch permanent "^/~(.*)$" "http://example.org/~$1" 
  66. </VirtualHost>
  67.  
  68. Now git-clone http://git.example.org/git/repo will work.  And if you
  69. installed the gitweb package, http://git.example.org/ now will display a
  70. list of repositories, making them accessible through a web browser.
  71.  
  72.  -- Gerrit Pape <pape@smarden.org>  Fri, 15 Sep 2006 09:19:37 +0000
  73.